package com.moore.mapper;

import com.moore.bean.Contract;
import com.moore.bean.Message;
import org.apache.ibatis.annotations.Param;

import java.sql.Date;
import java.util.List;

public interface ContractMapper {
    Contract getContractInfo(@Param("account") String account);

    int updateStatusToRented(@Param("id") int id);

    int confirmPassword(@Param("id") long id,@Param("password") String password);

    int addContract(Contract contract);

    int getContract(@Param("account") String account);

    List<Contract> getContractList(@Param("startDate") Date startDate, @Param("endDate") Date endDate, @Param("name") String name, @Param("status") String status, @Param("curr")int curr, @Param("size")int size);

    int getContractCount(@Param("startDate") Date startDate, @Param("endDate") Date endDate, @Param("name") String name, @Param("status") String status);

    int terminationContract(@Param("id") int id);

    String getTenant(String name);

    int sendMessage(@Param("message") Message message);
}
